package main.test.SparkAPI.Baics

class Money(val value: Double, val country: String) {}

object Money {
  def apply(value: Double, country: String) : Money = new Money(value, country)

  def unapply(money: Money): Option[(Double, String)] = {
    if(money == null) {
      None
    } else {
      Some(money.value, money.country)
    }
  }
}
